# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Maintainer: Maxime Arthaud <maxime@arthaud.me>

pkgname=zxing-cpp
pkgver=1.2.0
pkgrel=1
pkgdesc='A C++ library to decode QRCode'
arch=(x86_64)
url='https://github.com/nu-book/zxing-cpp'
license=(Apache)
depends=(gcc-libs)
makedepends=(cmake)
source=(https://github.com/nu-book/zxing-cpp/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('653d9e44195d86cf64a36af9ff3a1978ec5599df3882439fefa56e7064f55e8a')

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_BLACKBOX_TESTS=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
